package com.example.covid19.mapper;

import com.example.covid19.entity.Demander;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author BaiZhengChun
 * @since 2023-03-07
 */
public interface DemanderMapper extends BaseMapper<Demander> {
    @Select("SELECT " +
            " demander.*, " +
            " student.`name` " +
            " FROM " +
            " demander " +
            " INNER JOIN " +
            " student " +
            " ON " +
            " demander.studentid = student.studentid " +
            " WHERE " +
            " demander.studentid = #{id}")
    List<Demander> stinfo(@Param("id")String id);

}
